package com.tokenplus.thai.me

import android.annotation.SuppressLint
import android.view.View
import androidx.lifecycle.ViewModel
import com.tokenplus.thai.base.BaseActivity
import com.tokenplus.thai.databinding.ActivitySettingBinding
import com.tokenplus.thai.enums.PageTagEnum
import com.tokenplus.thai.extend.startToLoginActivity
import com.tokenplus.thai.extend.startToPasswordVerifyActivity

@SuppressLint("CustomSplashScreen")
class SettingActivity : BaseActivity() {

    private lateinit var mActivityBinding: ActivitySettingBinding

    override fun onBindingViewModel(): List<ViewModel>? {
        val list = mutableListOf<ViewModel>()
        return list
    }

    override fun onBindingViewTag(): String {
        return PageTagEnum.setting.name.uppercase()
    }

    override fun onBindingContentView(): View {
        mActivityBinding = ActivitySettingBinding.inflate(layoutInflater)
        return mActivityBinding.root
    }

    @SuppressLint("NotifyDataSetChanged")
    override fun onContentViewBinded() {
        try {
            //点击 修改密码
            mActivityBinding.rlMySettingChangePassword.setOnClickListener {
                startToPasswordVerifyActivity()
            }

            //点击 退出
            mActivityBinding.rlMySettingLogout.setOnClickListener {
                startToLoginActivity()
            }
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }
}